package com.it.controller;

import com.it.config.MQConfig;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class PayController {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void notifyurl(/*HttpServletRequest request*/) {

        String orderId = "15151515155";
        rabbitTemplate.convertAndSend(MQConfig.myPayExchange, "info.pay",orderId);
        System.out.println("支付成功向订单微服务发送MQ的数据");
    }
}
